package com.applink.sell_proof.model;

import java.io.Serializable;

public class Quiz implements Serializable {
	private long		id;
	private String		name;
	private String		description;
	private long		startDate;
	//private String endDate;
	private long		endDate;
	private Question[]	question;
	private Category	category;
	private boolean		isSubmitted;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public long getStartDate() {
		return startDate;
	}

	public void setStartDate(long startDate) {
		this.startDate = startDate;
	}

	public long getEndDate() {
		return endDate;
	}

	public void setEndDate(long endDate) {
		this.endDate = endDate;
	}

	public Question[] getQuestion() {
		return question;
	}

	public void setQuestion(Question[] question) {
		this.question = question;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public boolean isSubmitted() {
		return isSubmitted;
	}

	public void setSubmitted(boolean isSubmitted) {
		this.isSubmitted = isSubmitted;
	}

	public static enum Category {
		LEARN(87), LIFE_STYLE(88);
		private final int	category;

		private Category(int category) {
			this.category = category;
		}

		@Override
		public String toString() {
			switch (category) {
			case 87:
				return "learn";
			case 88:
				return "lifestyle";
			default:
				break;
			}
			return null;
		}

		public static Category getCategory(int category) {
			switch (category) {
			case 87:
				return LEARN;
			case 88:
				return LIFE_STYLE;
			default:
				break;
			}
			return null;
		}

		public int toInt() {
			return category;
		}
	}
}
